package com.tanhua.dubbo.api;

import com.tanhua.model.mongo.Movement;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface MovementApi {
    //发布动态
    String publish(Movement movement);
    //查询自己动态
    PageResult findByUserId(Integer page, Integer pagesize, Long userId);
    //查询好友动态
    PageResult findByFriendMovementsVo(Integer page, Integer pagesize, Long userId);

    //随机获得动态
    PageResult randomMovements(Integer page, Integer pagesize);
    //根据pid数组查询动态
    PageResult findMovementsByPids(List<Long> pids, Integer page, Integer pagesize);

    Movement findById(String movementId);

    PageResult findAllByMovements(Integer page, Integer pagesize, Long uid, Integer state);

    void update(String movementId, int state);
}
